//
//	File: OyFreeCameraMode.h
//

#ifndef OY_FREECAMERAMODE_H
#define OY_FREECAMERAMODE_H

#include "OyGeneral.h"

class DllExport OyCameraModeFree : public OyMovementController
{
public:
   	OyCameraModeFree(void);
   	virtual ~OyCameraModeFree(void);

    virtual void Update(float fElapsedTime);

    // use this functions to influence movement
    void AddRotationSpeed(float sx, float sy, float sz);
    void SetRotationSpeed(float sx, float sy, float sz);
    inline void SetRotationSpeedX(float f) { m_fPitchSpeed = f; }
    inline void SetRotationSpeedY(float f) { m_fYawSpeed   = f; }
    inline void SetRotationSpeedZ(float f) { m_fRollSpeed  = f; }
    inline void AddThrust(float fThrust)   { m_fThrust += fThrust; }
    inline void SetThrust(float fThrust)   { m_fThrust  = fThrust; }

    // set attributes directly (avoid this except for initialization)
    void SetRotation(float rx, float ry, float rz);
	void SetPos(float x, float y, float z)   { m_vcPos.x = x; m_vcPos.y = y; m_vcPos.z = z; }
    void SetRight(float x, float y, float z) { m_vcRight.x = x; m_vcRight.y = y; m_vcRight.z = z; }
    void SetUp(float x, float y, float z)    { m_vcUp.x = x; m_vcUp.y = y; m_vcUp.z = z; }
    void SetDir(float x, float y, float z)   { m_vcDir.x = x; m_vcDir.y = y; m_vcDir.z = z; }
};

#endif